package com.danbay.cloud.timedtask.service;

import com.danbay.cloud.timedtask.entity.Address;
import com.danbay.cloud.timedtask.entity.Person;
import com.danbay.framework.redis.RedisClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author SJG
 *         2017/12/22.
 */
@Service
public class XXService {

    @Autowired
    RedisClient redisClient;

    public void test() {
        System.out.println("test");
        redisClient.setEntity("a", new Person("a", "b", new Address("aaaaaa", System.currentTimeMillis() + "")));
        Person person=redisClient.getEntity("a");
        System.out.println(person.getAddress().getStreet());
    }


}
